<script>
	export default {
		onLaunch: function() {
			// #ifdef APP-PLUS
			this.isApp(); //只有在APP环境里执行
			this.mobile(); //获取手机推送标识
			// #endif
			this.userInfoCache(); //获取并缓存用户信息
			this.updateUserInfo(); //更新用户状态
			//console.log(this);
			// #ifdef MP-WEIXIN
			this.isWx();
			// #endif 
		},
		onShow: function() {

		},
		onHide: function() {
			//console.log("App Hide");
		},
		methods: {
			/**
			 * 获取手机推送标识
			 */
			mobile() {
				let info = plus.push.getClientInfo();
				let mobile_id = info.clientid;
				let uid = this.isLogin() ? this.isLogin().id : ''
				this.req({
					url: 'mobile/info',
					data: {
						mobile_id: mobile_id,
						uid: uid
					}
				}, (res) => {
					console.log(res)
				})
			}
		}
	};
</script>

<style lang="scss">
	/*每个页面公共css */
	.uni-clearfix:after {
		content: " ";
		display: block;
		clear: both;
		height: 0;
	}

	.uni-clearfix {
		zoom: 1;
	}
</style>
